#include <iostream>
using namespace std;
int main() {
	int h = 100;
	do
	{
		int h1 = 0;
		int h2 = 0;
		int h3 = 0;
		h1 = h % 10;
		h2 = h / 10 % 10;
		h3 = h / 100;
		if (h == h1 *h1*h1+h2*h2*h2+h3*h3*h3)
		{
			cout << h << "is right" <<endl;
		}
		h++;
	}while (h < 1000);
	system("pause");
	return 0;
}

